/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Models;

import Structures.ProfileDataBase;
import Structures.ReceiptProfile;
import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;

/**
 *
 * @author Mariusz
 */
public class trainingImagesComboBoxModel extends AbstractListModel implements ComboBoxModel {
    private ReceiptProfile profile;

    public trainingImagesComboBoxModel(ProfileDataBase db, int profindex) {
        this.profile = db.profiles.get(profindex);
    }

    public int getSize() {
        return profile.getImages().size();
    }

    public Object getElementAt(int index) {
        return profile.getImages().get(index).getFileLocation();
    }

    public void setSelectedItem(Object anItem) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Object getSelectedItem() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
